package com.cskaoyan.mapper.wxMapper;

import com.cskaoyan.bean.bo.vxBo.CouponWxBO;
import com.cskaoyan.bean.po.wxPo.MarketCoupon;
import com.cskaoyan.bean.po.wxPo.MarketCouponExample;
import com.cskaoyan.bean.po.wxPo.MarketCouponUser;
import com.cskaoyan.bean.vo.vxVo.WxIndexCouponVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketCouponMapper {
    long countByExample(MarketCouponExample example);

    int deleteByExample(MarketCouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketCoupon record);

    int insertSelective(MarketCoupon record);

    List<MarketCoupon> selectByExample(MarketCouponExample example);

    MarketCoupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketCoupon record, @Param("example") MarketCouponExample example);

    int updateByExample(@Param("record") MarketCoupon record, @Param("example") MarketCouponExample example);

    int updateByPrimaryKeySelective(MarketCoupon record);

    int updateByPrimaryKey(MarketCoupon record);

    /**
     *  该方法由张翔负责;
     * @return
     */
    List<MarketCoupon> selectCoupon();

    List<CouponWxBO> selectMyCoupon(@Param("status") Short status);

//selectAllCouponqq
    void updateStatus(@Param("id") Integer id);

    List<WxIndexCouponVO> selectAllCoupon();


    MarketCoupon selectReceive(@Param("marketCouponUser") MarketCouponUser marketCouponUser);

//    int insertReceive(@Param("marketCoupon") MarketCoupon marketCoupon,);

    MarketCoupon selectExchange(@Param("marketCoupon")MarketCoupon marketCoupon);

    int insertExchange(@Param("marketCoupon1") MarketCoupon marketCoupon1, @Param("userId")Integer userId);

    int insertReceive(@Param("marketCoupon")MarketCoupon marketCoupon, @Param("userId")Integer userId);

    List<CouponWxBO> selectSelectList(Integer userId);
}